# Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
# Contributor: Mario A. Vazquez <mario_vazq@hotmail.com>

pkgbase=pyxdg
pkgname=('python2-xdg' 'python-xdg')
pkgver=0.26
pkgrel=2
pkgdesc="Python library to access freedesktop.org standards"
arch=('any')
url="http://freedesktop.org/Software/pyxdg"
license=("LGPL")
makedepends=('python2' 'python')
source=("https://files.pythonhosted.org/packages/source/${pkgbase::1}/${pkgbase}/${pkgbase}-${pkgver}.tar.gz")
sha1sums=('904b336596167b8e4a829d77ec4107d5d2e200a6')
validpgpkeys=('6391296E3F25C0A721C1F1AFAF88B3AC5DECB224') # Thomas Kluyver

package_python2-xdg() {
  depends=('python2')
  conflicts=('pyxdg')
  provides=('pyxdg')
  replaces=('pyxdg')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  python2 setup.py install --prefix=/usr --root="${pkgdir}"
}

package_python-xdg() {
  depends=('python')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
}
